<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>{APPNAME}</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

	<script src="//cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
	<script src="//cdn.bootcss.com/marked/0.4.0/marked.min.js"></script>
	<script src="//cdn.bootcss.com/ace/1.3.3/ace.js"></script>
	{$js}
	<script src="https://cdn.bootcss.com/prism/1.14.0/prism.min.js"></script>
	<script src="https://cdn.bootcss.com/prism/1.14.0/components/prism-bash.min.js"></script>
	<script src="https://cdn.bootcss.com/Sortable/1.6.0/Sortable.min.js"></script>
	<script src="file/js/layui/layui.js"></script>
	<script src="file/js/edit.js"></script>
	<link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.css" rel="stylesheet">
	<link href="//cdn.bootcss.com/octicons/3.5.0/octicons.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/prism/1.14.0/themes/prism.min.css">
	<link href="/file/js/layui/css/layui.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="/file/css/edit.css">
	<link rel="stylesheet" type="text/css" href="/file/css/{$css}.css">
</head>

<body>

	<div id="header">
		<h1 id="header-title">{APPNAME}</h1>
		<div id="header-user">
			<div id="header-user-head">
				<i class="fa fa-user fa-2x" aria-hiddem="true" style="margin: 7px 0px 0px 5px;"></i>
			</div>
			<span id="header-user-name">{$USERNAME}</span>
			<span id="header-user-emailandlogout">{getUserEmail($USERNAME)} | <a style="cursor: pointer;" onclick="$('#header-user-logoutform').submit();">退出</a></span>
			<form id="header-user-logoutform" method="post" action="login.php">
				<input type="hidden" name="type" value="logout">
			</form>

		</div>
	</div>


	<div id="content">
		<div id="toolbar">
			<div class="toolbar-icon" title="新建" onclick="newNoteBelow()" style="padding-left: 17px;"><span class="octicon octicon-file-text" style="font-size: 19px;"></span></span></div>
			<div class="toolbar-icon" title="新建分类" onclick="newNotebook()"><span class="octicon octicon-file-directory"></span></div>
			<div class="toolbar-icon" title="保存" onclick="saveNote()"><i class="fa fa-lg fa-floppy-o" aria-hidden="true"></i></div>
			<div class="toolbar-icon" title="搜索" onclick="EditorAce.execCommand('find');" style="padding-left: 14px;"><span class="octicon octicon-search"></span></div>
			<div class="toolbar-icon" title="设置" onclick="setting()"><span class="octicon octicon-gear"></span></div>
		</div>
	 	<div id="sidebar">
	 		<div id="sidebar-status">状态: <span id="sidebar-status-icon">●</span> <span id="sidebar-status-text">页面载入中…</span></div>
			<div id="sidebar-notelist">载入中…</div>
	 	</div>
	 	<div id="editor">
			<div id="editor-ace"># 欢迎使用记事本程序

请从左边的__记事本__列表中选择.</div>
			<div id="editor-move"></div>
			<div class="markdown-body" id="editor-show"></div>
			<div id="editor-show-preprocess"></div>
		</div>
		<div id='other'>
			<div id='setting'>
			<form  class="layui-form" accept-charset="utf-8">
				<div class="layui-form-item">
				    <label class="layui-form-label">真实姓名</label>
				    <div class="layui-input-inline">
				    	<input type="text" name="setting[nickname]" required  lay-verify="required" autocomplete="off" value="{$settings->nickname}" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">默认载入内容</label>
				    <div class="layui-input-inline">
				    	<input type="text" name="setting[noteid]" required  lay-verify="required" placeholder="请输入内容编号" autocomplete="off" value="{$settings->noteid}" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">自动保存时间间隔</label>
				    <div class="layui-input-inline">
				    	<input type="text" name="setting[interval]" required  lay-verify="required|number" placeholder="请输入内容编号" autocomplete="off" value="{$settings->interval}" class="layui-input">
					</div>
					<div class="layui-form-mid layui-word-aux">单位毫秒，时间越长对服务器压力越小，但可能丢数据。</div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">后台展示风格</label>
				    <div class="layui-input-inline">
				    	<input type="checkbox" {if $settings->black} checked="checked"{/if} name="setting[black]" lay-text="白色|黑色" lay-skin="switch">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">数学公式支持</label>
				    <div class="layui-input-inline">
				    	<input type="checkbox" {if $settings->math} checked="checked"{/if} name="setting[math]" lay-text="开启|关闭" lay-skin="switch">
				    </div>
				    <div class="layui-form-mid layui-word-aux">MathJax功能强悍，加载的文件比较多，如果不使用建议关闭</div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">代码[code]格式支持</label>
				    <div class="layui-input-inline">
				    	<input type="checkbox" {if $settings->code} checked="checked"{/if} name="setting[code]" lay-text="开启|关闭" lay-skin="switch">
				    </div>
				    <div class="layui-form-mid layui-word-aux">tab+[code]的方式高亮代码还是比较方便的，会有性能影响但不大，不用的可以关闭</div>
				</div>
				<div class="layui-input-block layui-word-aux">上面两项只影响后台系统，分享的内容页面会自动判断是否引用。</div>
				<div class="layui-form-item">
				    <div class="layui-input-block">
				      <button class="layui-btn" lay-submit lay-filter="btnsetting">确定</button>
				    </div>
				  </div>
			</form>
				
			</div>
		</div>
	</div>

	<div id="cmenu1" class="contextmenu">
		<div class="contextmenu-item" onclick="noteContextClick('open');">		<i class="fa fa-file" aria-hidden="true"></i> 打开</div>
		<div class="contextmenu-item" onclick="noteContextClick('rename');">	<i class="fa fa-edit" aria-hidden="true"></i> 重命名</div>
		<div class="contextmenu-item" onclick="noteContextClick('clone');">		<i class="fa fa-clone" aria-hidden="true"></i> 复制</div>
		<!-- <div class="contextmenu-item" onclick="noteContextClick('share');">		<i class="fa fa-share-alt" aria-hidden="true"></i> Share</div> -->
		<!-- <div class="contextmenu-item" onclick="noteContextClick('export');">	<i class="fa fa-external-link " aria-hidden="true"></i> Export</div> -->
		<div class="contextmenu-item"onclick="noteContextClick('share');"><i class="fa fa-share-alt" aria-hidden="true"></i> 共享</div>
		<div class="contextmenu-item" onclick="noteContextClick('delete');">		<i class="fa fa-trash" aria-hidden="true"></i> 删除</div>
		<div class="contextmenu-item" onclick="noteContextClick('properties');">	<i class="fa fa-info-circle" aria-hidden="true"></i> 属性</div>
	</div>
	<div id="cmenu2" class="contextmenu">
		<div class="contextmenu-item" onclick="noteContextClick('rename');">	<i class="fa fa-edit" aria-hidden="true"></i> 重命名</div>
		<div class="contextmenu-item" onclick="noteContextClick('delete');">		<i class="fa fa-trash" aria-hidden="true"></i> 删除</div>
	</div>


	<div id="page-glass" onclick="hideProperties();"></div>
	<div id="sidebar-properties">
		<div id="sidebar-properties-header">
			<i class="fa fa-file-text fa-3x" aria-hidden="true"></i>
			<span id="sidebar-properties-header-notename">notename</span>
			<span id="sidebar-properties-header-notetype"></span>
		</div>
		<div id="sidebar-properties-body">
			<span class="sidebar-properties-body-lable">标题</span><span id="sidebar-properties-body-name"></span><br>
			<span class="sidebar-properties-body-lable">最后修改</span><span id="sidebar-properties-body-lastmodify"></span><br>
			<span class="sidebar-properties-body-lable">最后访问</span><span id="sidebar-properties-body-lastaccess"></span><br>
			<span class="sidebar-properties-body-lable">共享地址</span><span id="sidebar-properties-body-shareurl"></span><br>

		</div>
	</div>

	<input id="float-input" type="text">

	<div id="float-notsaved-lable">●</div>


</body>
</html>
